import java.io.BufferedWriter;
import java.io.FileWriter;

/*
BufferedWriter是带有缓冲区的字符输出流
OutputStreamWriter将字节流转换成字符流
 */
public class BufferedWriterTest01 {
    public static void main(String[] args) throws Exception {
        FileWriter fileWriter = new FileWriter("C:\\Users\\30539\\Desktop\\text2.txt");
        BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
        bufferedWriter.write("hello");

        //只需要关闭最外层的流就可以了
        bufferedWriter.close();
    }
}
